package cn.itsource.org.mapper;

import cn.itsource.org.domain.Department;
import cn.itsource.org.query.DepartmentQuery;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 持久层
 *
 *    alt   +   enter
 */
public interface DepartmentMapper extends Mapper<Department> {

    // 基本的CRUD通过继承获得

    /**
     *   连表查询部门数据
     * @return
     */
    List<Department> getAll(DepartmentQuery query);

    /**
     * 获取父级部门数据
     * @return
     */
    List<Department> getParentDepts();
}
